home *** CD-ROM | disk | FTP | other *** search
/ Aminet 21 / Aminet 21 (1997)(GTI - Schatztruhe)[!][Oct 1997].iso / Aminet / mus / play / AModPlay.lha / amodplay / Install < prev    next >
Encoding:
Text File  |  1997-08-19  |  3.9 KB  |  149 lines

  1. ; Install script for AModPlay V1.1
  2.  
  3. (set #bad-kick "\n\nSorry! You must have Workbench 2.0 or higher to to use AModPlay\n.")
  4. (set #hello-message "\nWelcome to the AModPlay Installer Script.\n\n\nAModPlay V1.57.\n\nBy Cliff Earl (24.8.1997).\n\n© 1996-1997 Antix Software.\n\n\nFeedback to cee@voyager.co.nz")
  5. (set #installing "\nInstalling ")
  6. (set #where-to "\nWhere should I put the ")
  7. (set #install-which "\nWhich components should be installed?\n")
  8. (set #exe-dest (cat #where-to "\nmain program file?\n"))
  9. (set #doc-dest (cat #where-to "Documentation?\n"))
  10. (set #rexx-dest (cat #where-to "Arexx scripts?\nA new directory WILL be created.\n"))
  11. (set #exit-message "\nAModPlay Installed!\nEnjoy.")
  12.  
  13. ; ---------------------------------------------------------------------------
  14. ; exit if wrong wb version.
  15.  
  16.  (if (< (getversion "LIBS:version.library") (* 37 65536))
  17.         (abort #bad-kick)
  18.  )
  19.  
  20. ; ---------------------------------------------------------------------------
  21.  
  22. (message #hello-message)
  23.  
  24. ; ---------------------------------------------------------------------------
  25. ; find out which components should be installed
  26.  
  27. (set InstallOpt
  28.       (askoptions
  29.                  (prompt #install-which)
  30.                  (help @askoptions-help)
  31.                  (choices " AModPlay executable" " Arexx Scripts" " BFBPlay libraries" " Documentation.")
  32.       )
  33. )
  34.  
  35. (if (= InstallOpt 0)
  36.       (abort "\n\n\nYou did not select any components\n\n\nInstallation Aborted!!")
  37. )
  38.  
  39. (complete 0)
  40.  
  41. ; ---------------------------------------------------------------------------
  42. ;Install executable.
  43.  
  44. (if (BITAND InstallOpt 1)
  45.   ((set destdir
  46.       (askdir
  47.              (prompt #exe-dest)
  48.              (help @askdir-help)
  49.              (default "Sys:WBStartup")
  50.       )
  51.    )
  52.  
  53.      (copyfiles
  54.                (source "AModPlay")
  55.                (dest destdir)
  56.                (infos)
  57.      )
  58.    )
  59. )
  60.  
  61. (complete 25)
  62.  
  63. ; ---------------------------------------------------------------------------
  64. ;Install rexx scripts.
  65.  
  66. (if (BITAND InstallOpt 2)
  67.   ((set destdir
  68.       (askdir
  69.              (prompt #rexx-dest)
  70.              (help @askdir-help)
  71.              (default "REXX:")
  72.       )
  73.   )
  74.  
  75.     (foreach "REXX" "#?.amp"
  76.        (
  77.           (set nextscript (tackon "REXX" @each-name))
  78.              (copyfiles
  79.                        (source nextscript)
  80.                        (dest (tackon destdir "AModPlay"))
  81.                        (newname @each-name)
  82.                        (prompt (cat #installing @each-name))
  83.                        (help @copyfiles-help)
  84.                        (infos)
  85.              )
  86.           )
  87.        )
  88.  
  89.   )
  90. )
  91.  
  92. (complete 50)
  93.  
  94. ; ---------------------------------------------------------------------------
  95. ;Install libraries.
  96.  
  97. (if (BITAND InstallOpt 4)
  98.   (
  99.      (copylib
  100.              (prompt "\nCopying BFBPlayMaster.library to LIBS:\n")
  101.              (source "LIBS/bfbplaymaster.library")
  102.              (dest "LIBS:")
  103.              (help @copylib-help)
  104.              (confirm)
  105.      )
  106.  
  107.        (foreach "LIBS/replayers" "#?.library"
  108.           (
  109.              (set nextlib (tackon "LIBS/replayers" @each-name))
  110.                 (copylib
  111.                         (source nextlib)
  112.                         (dest "LIBS:replayers")
  113.                         (newname @each-name)
  114.                         (prompt (cat #installing @each-name))
  115.                         (help @copylib-help)
  116.                         (confirm)
  117.                 )
  118.              )
  119.        )
  120.   )
  121. )
  122.  
  123. (complete 75)
  124.  
  125. ; ---------------------------------------------------------------------------
  126. ;Install documentation.
  127.  
  128. (if (BITAND InstallOpt 8)
  129.   ((set destdir
  130.       (askdir
  131.              (prompt #doc-dest)
  132.              (help @askdir-help)
  133.              (default "DOCS:")
  134.       )
  135.    )
  136.      (copyfiles
  137.                (source "Docs/AModPlay.guide")
  138.                (dest destdir)
  139.                (infos)
  140.      )
  141.    )
  142. )
  143.  
  144. (complete 100)
  145.  
  146. ; ---------------------------------------------------------------------------
  147.  
  148. (exit)
  149.